package com.citygis.transferdata.api.source2.controller;

import com.alibaba.fastjson.JSONObject;
import com.citygis.transferdata.api.source2.service.SecondService;
import com.citygis.transferdata.config.resultBody.ResultBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: SecondController 
 * @Description: TODO
 * @author: liuzg
 * @Date: 2021/8/31 10:04
 * @Version: v1.0
 */
@RestController
@RequestMapping(value = "/sourceTwo")
@Api(tags = "数据源二")
public class SecondController {

    @Resource
    private SecondService service;

    @GetMapping(value = "/getlist")
    @ApiOperation(value = "获取数据列表")
    public ResultBody getList(){
        List<JSONObject> list = service.getList();
        return ResultBody.success(list);
    }


}
